Upload Assets

Finalize additional file

The endpoints described in Step 4 are an Either/Or choice. You should use either the Finalise an uploaded file endpoint to finalize and process a standard upload, or the Finalize additional file endpoint to finalize and save an additional uploaded file as a new asset.

post

Path Parameters

idstringrequired

Asset id to which to save the new additional.

Example:00000000-0000-0000-0000-000000000000

uploadIdstringrequired

The upload id of the file.

Example:T3.fS5.5HPhtYFtm2b_.e7wVe910tL5XQutKw1jkMqlP5cPQVyZkOZxZ9lJiGUk4FIw6M0CFZ3xogTWrm.GPI2p2CaglQcAS5aH37zT_vHJnbtkebYbheXIQc_.M_6hM

Body

application/x-www-form-urlencoded
chunksnumber

Total number of chunks uploaded.

Example:5

s3_filenamestring

Base location of the uploaded file.

Example:api_uploads/00000000-0000-0000-0000-000000000000/00000000-0000-0000-000000000000/Logo.png

targetIdstring

Target id as returned by the initialise call.

Example:final/00000000-0000-0000-0000-000000000000/Logo.png

Response

201 application/json

Created

post/api/v4/media/{id}/save/additional/{uploadId}/

Body

{}
 
201 application/json

Step 5 Poll for processing status

This endpoint allows you to check the processing status of a finalized upload. It should be called repeatedly until the response indicates that the processing is complete or provides the item IDs of the processed files.

Retrieve poll state

This call needs to be executed in a loop until its response returns the item(s) id(s) passed in the items parameter.

get

Query Parameters

itemsstringrequired

Comma-separated import id’s of a finalised file, as returned by the finalise call.

Example:00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000

Response

200 application/json

Successful response

get/api/v4/upload/poll
 
200 application/json

Step 6 EITHER Save as a new asset

This endpoint finalizes the upload after all chunks have been uploaded. You need to provide the file ID and details about the file, including its name, size, and the number of chunks it was split into.

Save as a new asset

For metaproperties that use options (Select, Select2, Autocomplete), modifying an asset’s metaproperty options should be done via option UUID’s for the API to work optimally, sending name or label values will be deprecated in the future. Other metaproperties (Date, Text and Longtext), values can be submitted directly. Be aware that the endpoints described in Step 6 are an Either/Or choice. You should use either the Save as a new asset endpoint to save the uploaded file as a new asset, or the Update existing asset endpoint to update an existing asset with the uploaded file.

post

Path Parameters

importIdstringrequired

Import id of a finalised and processed upload to be saved.

Example:00000000-0000-0000-0000-000000000000

Headers

Content-Typestringrequired

Body

application/x-www-form-urlencoded
ISOPublicationDatestring

Date/time of publication in ISO08601-format.

Example:2014-06-12T18:53:21.000Z

accessRequestIdstring

If audit is set to true you can specify an accessRequestId to batch uploads to the waiting room. The accessRequestId is retrieved in the response of this endpoint, after you save the first asset of your batch.

Example:00000000-0000-0000-0000000000000000

accessTypestring

If audit is set to true you can specify an access type to define to which waiting room location the asset is uploaded to. The available locations are: Upload, Edit, Workflow approval (export), Shutterstock and Stock.

Allowed values:uploadeditexportshutterstockstock

Example:upload

archiveDatestring

Archive date/time of the asset in ISO8601-format.

Example:2014-12-25T10:30:00.000Z

auditboolean

Flags if the asset should be sent to the waiting room.

Example:true

brandIdstringrequired

Brand id to save the asset to.

Example:00000000-0000-0000-0000-0000000000000000

categoriesstring

Comma-separated category ids of the asset.

Example:00000000-0000-0000-0000000000000000,00000000-0000-0000-0000000000000000

copyrightstring

Copyright information of the asset.

Example:Copyright (c) Example corp.

crc32integer

CRC32 checksum of the original file, used for verification.

Example:79764919

descriptionstring

Extended asset description.

Example:Extended asset description

isPublicboolean

Flags if the asset should be Public.

Example:true

metapropertystring

Dictionary with (metaproperty) options to set on the asset. Send fields as metaproperty.METAPROPERY_ID with a string of all its (metaproperty) options ids comma-separated.

Example:metaproperty.00000000-0000-0000-0000000000000000=00000000-0000-0000-0000000000000000,00000000-0000-0000-0000000000000000

namestring

Name of the asset.

Example:Asset name

publicationDatestring

DEPRECATED Date/time of publication in linked API user selected locale-format.

Example:05-31-2010

requestorIdstring

If audit is set to true you can specify a requestor ID (user ID) to identify the user uploading the asset to the waiting room.

Example:00000000-0000-0000-0000000000000000

tagsstring

Comma-separated list of tags of the asset.

Example:scenery,grassland,Holland

watermarkDatestring

Watermark datetime. ISO8601 format: yyyy-mm-ddThh:mm:ssZ.

Example:2014-12-25T10:30:00.000Z

Response

application/json

Created

post/api/v4/media/save/{importId}

Body

{ "brandId": "00000000-0000-0000-0000-0000000000000000" }
 
application/json